import { ApiProperty } from '@nestjs/swagger';
import { IsNotEmpty, IsNumber, IsOptional, IsString } from 'class-validator';

// 投递简历
export class CreateDeliveryDto {
  @ApiProperty({ description: '用户ID' })
  @IsNotEmpty()
  @IsString()
  userId: string;

  @ApiProperty({ description: '招聘者ID' })
  @IsNotEmpty()
  @IsString()
  friendId: string;

  @ApiProperty({ description: '岗位ID' })
  @IsNotEmpty()
  @IsNumber()
  jobId: number;

  @ApiProperty({ description: '岗位名称' })
  @IsNotEmpty()
  @IsString()
  jobName: string;

  @ApiProperty({ description: '用户昵称' })
  @IsNotEmpty()
  @IsString()
  nickName: string;

  @ApiProperty({ description: '简历ID' })
  @IsNotEmpty()
  @IsNumber()
  resumeId: number;
}

// 更新简历状态
export class UpdateDeliveryStatusDto {
  @ApiProperty({ description: '类型 one 单个 all 全部' })
  @IsNotEmpty()
  @IsString()
  type: string;

  @ApiProperty({ description: '用户ID' })
  @IsOptional()
  @IsString()
  userId?: string;

  @ApiProperty({ description: 'ID' })
  @IsOptional()
  @IsNumber()
  id?: number;
}
